package com.xcw;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Author bhx
 * @Date 2022/11/7 21:48
 * @Description TODO
 */
@SpringBootApplication
public class TestSpringApplication {
    @Autowired
    private static User userss;
    public static void main(String[] args) {
        SpringApplication.run(TestSpringApplication.class, args);

        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(Config.class);
        User user = (User) applicationContext.getBean(User.class);

        System.out.println("执行了");
        System.out.println(user);
        System.out.println(userss);
    }
}
